Fix objective functions (for shape_optimization.py)#1167
Fix objective functions (for shape_optimization.py)#1167pcarruscag merged 11 commits intodevelopfrom
Conversation
| /* DESCRIPTION: Compute buffet sensor */ | ||
| addBoolOption("BUFFET_MONITORING", Buffet_Monitoring, false); |
There was a problem hiding this comment.
I think this was cheap enough to compute by default.
| /// DESCRIPTION: Temperature | ||
| AddHistoryOutput("TEMPERATURE", "Temp", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Total avg. temperature on all surfaces set with MARKER_MONITORING.", HistoryFieldType::COEFFICIENT); |
There was a problem hiding this comment.
This "temperature" output was removed from everywhere except the heat and incompressible solvers, because it is a right mess. i.e. not consistent for the different solvers because for ones it depends on marker_analyse for others on marker_monitoring... Also the name TOTAL_AVG_TEMPERATURE could as well have been ?_?_TEMPERATURE, just as descriptive.
| void CDiscAdjSolver::RegisterObj_Func(CConfig *config) { | ||
|
|
||
| /*--- Here we can add new (scalar) objective functions ---*/ | ||
| if (config->GetnObj()==1) { | ||
| switch (config->GetKind_ObjFunc()) { |
There was a problem hiding this comment.
This does not seem to do anything anymore.
There was a problem hiding this comment.
Thanks a lot for this cleanup 💐
From now on I guess the history map should never be touched by hand and only via updateHistoryMap, am I right? If yes, would it be a thing to have historyMap.py removed from the repo and automatically call updateHistoryMap.py during installation process (i.e. historyMap exists only in the build folder)?
(And of course sorry for the late comments)
| } | ||
| } | ||
| } else { | ||
| } else if (false) { |
There was a problem hiding this comment.
I guess this is the section you refer to in #1171
| */ | ||
| class CAvgGrad_NEMO : public CNEMONumerics { | ||
| private: | ||
| unsigned short iDim, iVar; /*!< \brief Iterators in dimension an variable. */ |
There was a problem hiding this comment.
Did you get those as compiler warnings for unused variables? If yes, did you just use gcc with -Wall -Wextra or did you use any specific tool?
There was a problem hiding this comment.
Using clang with --warnlevel=2
|
It could be a thing to run it on installation, but at the same time it is also not a big deal to run it ourselves. |
Proposed Changes
I tried to do something about the OF's that are not working with the python scripts.
If I got it right, the OF string needs to match the name used for history/screen output, at least to allow the automatically generated history map to be used.
Related Work
#1075
PR Checklist